<%= form_for [kuztuscms, @template], :html => { :class => 'form-horizontal' } do |f| %>
  <% if @template.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@template.errors.count, "error") %> prohibited this template from being saved:</h2>

      <ul>
      <% @template.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>
  <fieldset>
    <legend><%= controller.action_name.capitalize %> template</legend>

    <div class="control-group">
      <%= f.label :path, :class => 'control-label' %>
      <div class="controls">
        <%= f.text_field :path, :class => 'text_field' %>
      </div>
    </div>

    <div class="control-group">
      <%= f.label :format, :class => 'control-label' %>
      <div class="controls">
        <%= f.text_field :format, :class => 'text_field' %>
      </div>
    </div>

    <div class="control-group">
      <%= f.label :locale, :class => 'control-label' %>
      <div class="controls">
        <%= f.select :locale,
          options_for_select(@locales, @template.locale), :class => 'select' %>
      </div>
    </div>

    <div class="control-group">
      <%= f.label :handler, :class => 'control-label' %>
      <div class="controls">
        <%= f.select :handler,
          options_for_select(@handlers, @template.handler), :class => 'select' %>
      </div>
    </div>

    <div class="control-group">
      <%= f.label :body, :class => 'control-label' %>
      <div class="controls">
        <%= f.text_area :body, :class => 'text_area' %>
      </div>
    </div>

    <div class="form-actions">
      <%= f.submit nil, :class => 'btn btn-primary' %>
      <%= link_to 'Cancel', kuztuscms.templates_path, :class => 'btn' %>
    </div>
  </fieldset>
<% end %>
